/*
 * Copyright (C) 2015-2016 Actor LLC. <https://actor.im>
 */

.sidebar {
  position: relative;
  overflow: visible;

  display: flex;
  flex: 0 0 auto;
  width: $sidebar-width;
  height: 100%;
  color: $sidebar-text-color;
  flex-direction: row;
  background-color: $dusky-blue;
  flex-direction: column;
}

.sidebar__history {
  margin-top: 16px;
}

.sidebar__avatar {
  margin: 18px 10px 18px 0;
}

.sidebar__header {
  flex: 0 0 auto;
  height: $toolbar-height;
  user-select: none;
  transition: background $default-transition-duration $default-transition-timing;

  &__user {
    height: $sidebar-header-height;
    padding: 2px 14px;

    &__name {
      font-size: 16px;
      font-weight: 500;
      line-height: 22px;

      margin: 19px 0;

      vertical-align: middle;

      color: white;

      @include text-elipsis();
    }
    .dropdown__button {
      width: 24px;
      height: 24px;
      margin: 18px 0;

      transition: transform $default-transition-duration $default-transition-timing;
      vertical-align: middle;

      color: rgba(255, 255, 255, .65);
    }
  }

  .dropdown--opened {
    .dropdown__button {
      transition: transform $default-transition-duration $default-transition-timing;

      background-color: transparent !important;
      box-shadow: none !important;
    }
  }
  .dropdown__menu {
    top: 47px;

    min-width: 255px;
    margin-right: -67px;
  }

  &:hover {
    //background-color: rgba($baby-blue,.2);
    background-color: rgba($baby-blue, .12);
  }
  &--clickable {
    cursor: pointer;
  }
  &--opened {
    background-color: rgba($baby-blue, .2) !important;
    .dropdown__button {
      transform: scale(1, -1);

      color: white;

      backface-visibility: hidden;
    }
  }
}

.sidebar__quick-search {
  flex: 0 0 auto;
  height: $sidebar-footer-height;

  box-sizing: border-box;
  width: 100%;

  @include no-select();

  a {
    font-size: 14px;
    font-weight: 500;
    line-height: $sidebar-footer-height;

    display: block;

    width: 100%;
    height: 50px;

    cursor: pointer;
    text-align: center;
    text-transform: uppercase;

    color: rgba(white, .4);
    background-color: rgba(black, .1);
    &:hover {
      color: white;
      background-color: rgba(black, .15);
    }
  }
  .icon-holder {
    position: relative;

    display: inline-block;

    height: 100%;

    vertical-align: middle;
  }
  span {
    display: inline-block;

    vertical-align: middle;
  }
  .material-icons {
    position: absolute;
    top: 13px;
    right: 2px;
  }
}
